package com.alibaba.sdk.util;

import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.sdk.exception.BusinessException;
import org.apache.commons.beanutils.BeanUtils;

import java.util.Date;
import java.util.Map;

/**
 * 对象转化成键值对工具类 (key: 属性 value: 值)
 *
 * @author Shawn
 * @date 2021/3/30 9:44
 */
public class BeanUtil {

    // ps: userType:ADMIN username:admin
    public static Map bean2Map(Object obj) {
        try {
            return BeanUtils.describe(obj);
        } catch (Exception e) {
             throw new BusinessException("", "");
        }
    }
}
